package org.csu.agrisupply.api.service;

import org.csu.agrisupply.api.common.CommonResponse;
import org.csu.agrisupply.api.entity.User;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

public interface UserService {

    //得到所有User
    CommonResponse<List<User>> getUserList();
    //得到单个User
    CommonResponse<User> getUser(@PathVariable("id") String userId);
    //删除指定User
    CommonResponse<User> deleteUser(@PathVariable("id") String userId);
    //修改用户信息
    CommonResponse<User> updateUser(@PathVariable("id") String userId,User user);
    //给用户分配身份
    CommonResponse<User> setRole(@PathVariable("id") String userId,int role);


}
